import appService from '@/utils/appService';
import systemConfig from '@/utils/config';

const baseUrl = `${systemConfig.serverProxy}/trade-order`;

/**
 * 银行卡-列表查询
 * @returns {Promise<void>}
 */
export const queryBankCardPage = async payload => {
  const res = await appService.getRequest(`${baseUrl}/admin/bankCard/queryList`, payload);
  return res;
};

/**
 * 二维码订单-列表查询
 * @returns {Promise<void>}
 */
export const queryQrOrderList = async payload => {
  const res = await appService.getRequest(`${baseUrl}/admin/qr/queryList`, payload);
  return res;
};

/**
 * 二维码订单-详情
 * @returns {Promise<void>}
 */
export const queryDetailByOrderId = async orderId => {
  const res = await appService.getRequest(`${baseUrl}/admin/qr/queryDetailByOrderId/${orderId}`);
  return res;
};

/**
 * 二维码异常支付订单-列表查询
 * @returns {Promise<void>}
 */
export const queryAbnormalQrPayOrderList = async payload => {
  const res = await appService.getRequest(`${baseUrl}/admin/abnormalQrPayOrder/queryList`, payload);
  return res;
};

/**
 * 账单
 */

export const queryBillPage = async payload => {
  const res = await appService.postRequest(`${baseUrl}/admin/bill/page`, payload);
  return res;
};

